/**
 * Created by Generator on 2017/08/03
 */
package com.nmgmd.shequ.hospital.base.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.nmghr.base.jpa.annotation.ColumnComment;
import com.nmghr.base.jpa.entity.UUIDWithTimeEntity;
import com.nmghr.manager.rbac.entity.DictionaryEntity;
import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "t_hos_bill")
@Data
@EqualsAndHashCode(callSuper = true)
public class BillEntity extends UUIDWithTimeEntity {
    @Column(name="check_out_date")
    @ColumnComment(msg = "结账时间")
    private Long checkOutDate;

    @Column(name="checker")
    @ColumnComment(msg = "收银人")
    private String checker;

    @ColumnComment(msg = "支付方式")
    @ManyToOne
    @JoinColumn(name = "pay_type_id")
    private DictionaryEntity payType;

    @Column(name="receive_total", precision=18, scale=2)
    @ColumnComment(msg = "总应收")
    private BigDecimal receiveTotal;

    @Column(name="act_total", precision=18, scale=2)
    @ColumnComment(msg = "总实收")
    private BigDecimal actTotal;

    @Column(name="act_change", precision=18, scale=2)
    @ColumnComment(msg = "实际找零")
    private BigDecimal actChange;

    @Column(name="relief_total", precision=18, scale=2)
    @ColumnComment(msg = " 减免金额")
    private BigDecimal reliefTotal;

    @JoinColumn(name="relief_reason_id")
    @ManyToOne
    @ColumnComment(msg = "减免原因")
    private DictionaryEntity reliefReason;

    @Column(name="bill_name", length=300)
    @ColumnComment(msg = "账单名称")
    private String billName;

}
